#include <stdafx.h>

#include "tddDialog.h"

#include "Exception.h"

extern "C" int WINAPI WinMain(__in HINSTANCE , __in_opt HINSTANCE , __in_opt LPSTR , __in int )
{
	INITCOMMONCONTROLSEX iccs;
	iccs.dwSize = sizeof(iccs);
	iccs.dwICC  = ICC_TREEVIEW_CLASSES | ICC_PROGRESS_CLASS;
	InitCommonControlsEx(&iccs);

	// prepare the exception environment
	CWinUtil::vCheckMemoryLeak();
	CWinUtil::vSetThrowNewException();	
	CWinUtil::vMapSEHtoCE();
	CWinUtil::vSetUnExpectedExceptionFilter();

	CWinUtil::vInitStackEnviroment();

	return !!TddGui::CTddGuiDialog().DoModal();
}